package com.example.gatawayservice.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum ResultCode {
    //操作成功
    SUCCESS(1000, "操作成功"),

    //服务器内部错误，友好提示
    ERROR(2000, "服务繁忙请稍后重试"),
    FAILED(3000, "操作失败"),
    AILED_USER_EXISTS(3101, "用户已存在"),
    EMAIL_EXISTS(3102, "邮箱已被注册"),
    PHONE_EXISTS(3103, "手机号已被注册"),
    FAILED_USER_NOT_EXISTS(3104, "用户不存在"),
    FAILED_LOGIN(3105, "账号或密码错误"),
    FAILED_GET_ROLE(3106, "获取用户权限失败"),
    FAILED_AUTHORITY(3107, "权限不足"),
    FAILED_PARAMS_VALIDATE(3108, "参数校验失败"),
    FAILED_UNAUTHORIZED         (3109, "未授权");

    private int code;

    private String msg;
}
